TRIGGERS:

and
or
not
relation = {country = [tag] data = X} # From EU2
won_war = {country = [tag1] country = [tag2] } # tag1 has won a war against tag2
peace_treaty = { country = [tag1] country = [tag2] } # Do countries 1 and 2 have a peace treaty?
constitution = { country = [tag] type = [democracy/constitutional_monarchy/monarchy/presidential_dictatorship/proletarian_dictatorship] } # No country field means 'this country'
government = { country = [tag] type = [ruling party ideology] } # No country field means 'this country'
policy = { country = [tag] type = [policy type] } # No country field means 'this country'
ruling_party = [party id]
claim_buildings = [prov id] # There are claim buildings in the same area as prov.
uncolonized = [prov id] # True if the province has no owner
is_GP = [tag/yes/no]
colonialnation = [tag/yes/no/player] # True if nation has a claim buildings or colonies anywhere in the world. 'player' means "any human player" and only checks for new claim buildings not there at scenario start.
pending_revolution = [yes/no] # Militancy is high enough for a revolution to occur.
reform = { type = [reform type] level = [appropriate word] }
owned = { province = Y data = [tag] } # No data field means 'this country'
control = { province = Y data = [tag] } # No data field means 'this country'
pop_militancy = { province = Y data = [0-10] } # True if _any_ POP in province Y has militancy >= data.
event = x  #event has happened.
random = x 			( % )
leader = x #leader exists
atwar = [yes/no/country tag] 		# Country tag added to see if other countries are at war
campaign = [yes/no/country tag]		# Ongoing political campaign?
civilized = [yes/no/country tag]	# Is a country civilized or primitive?
is_satellite = [Country Tag]
satellite = { country = [tag 1] country = [tag 2] } # True if tag 1 is satellite of tag 2
is_dominion = [Country Tag]
dominion = { country = [tag 1] country = [tag 2] } # True if tag 1 is dominion of tag 2
ai = [yes/no/country tag] # Is the country AI controlled?
great_war = [yes/no] # Is there a Great War in progress?
technology = x  #True if a certain tech is known.
flag = { name = X value = Y }  #true if flag X exists and is greater than or equal to Y (where Y is an integer or [yes/no]).
local_flag = { name = X value = Y }  #true if flag X exists FOR CURRENT COUNTRY and is greater than or equal to Y (where Y is an integer or [yes/no]).
owned = { province = a data = tag }	# checks if province is owned by country x (if data == -1 then its for country receievin event)
control = { province = a data = tag }	# checks if province is controlled by country x (if data == -1 then its for country receievin event)
exists = country #if country exists.
alliance = { country =a  country = b )	# checks if a and b have a military alliance
war = { country =a  country = b )	# checks if a and b is at war
year = x (>=x)
revanchism = { country = [tag] data = X }	# X% or more of national provs owned by foreigners
desperation = { country = [tag] data = X }	# X% or more of national provs occupied by foreigners
occupied = { country = [tag] data = X }		# X% or more of owned provs occupied by foreigners
invention = x  #True if a certain invention is known.
police_budget = x # True if the crime fighting budget is at X or more % of total budget
stronger_army = { country = A country = B } # True if country A has a more powerful army than country B
stronger_navy = { country = A country = B } # True if country A has a more powerful navy than country B
pop_majority = [religion/culture/ideology/workforce] # Checks if the majority of POPs are of a certain type
prestige = X # Prestige > X
industry = X # Industrial Score > X
military = X # Military Score > X
greater_prestige = { country = tag1 country = tag2 } # tag1 has greater prestige than tag2
slavery = [yes/no] # Is slavery allowed in this country?
minorities = [yes/no] # Are there cultural minorities in the country?
war_exhaustion = { country = TAG value = x }   #[0-10] 1 = 10%, 2 = 20%# true if war exhaustion >= value
religion = { country = [tag] type = [religion type] }
culture = { country = [tag] type = [culture type ] }
hi_tax_lo = [yes/no] # Is the high strata tax higher than the low strata tax?
capital = X # Is the national capital in province X?
literacy = X # Is the literacy at or above X%?
badboy = X # Is the bad boy value at or above X
plurality = X # Is the plurality at or above X%?
executive_designation = [parliamentarism/hms_government/laws_by_decree]
party_system = [multi_party/two_party/one_party]
national_value = [liberty/equality/order]

COMMANDS:

type = badboy value = X				# Adjust the badboy value (float).
type = barrel_exploits value = X	# Tank reduction of enemy entrenchment bonus
type = infantry_exploits value = X	# Infantry reduction of enemy entrenchment bonus
type = gas_attack 					# Enable gas attacks
type = gas_protection 				# Enable gas protection
type = add_countryculture which = [culture]
type = remove_countryculture which = [culture]
type = set_religion which = [religion] # Set state religion
type = manpowerpool value = X
type = literacy	value = X # NOTE: Where X is 0.0 to 1.0
type = flagname which = "flagname-extension"
type = treasury value = X
type = resource which =[goodstype] value = #change
type = resource_type which =[goodstype] where = province[-1]
type = resource_value which =[goodstype](needed for random) value = #change where = province[-1]
type = relation which = [country tag] value = X # which = -2 means all our satellites and dominions. -3 means all great powers.
type = pop_militancy which = [religion/culture/ideology/workforce/cultural_majority/cultural_minority/religious_majority/religious_minority/X] value = Y where = [prov id]	# If no where field is specified the change is for all states. X is a percentage of the total POPs. The "where" field affects whole State of prov id.
type = pop_consciousness which = [religion/ideology/culture/workforce/cultural_majority/cultural_minority/religious_majority/religious_minority/X] value = Y where = [prov id] 	# If no where field is specified the change is for all states. X is a percentage of the total POPs. Prov id affects the whole state. The "where" field affects whole State of prov id.
type = pop_dominant_issue which = [religion/ideology/culture/workforce/cultural_majority/cultural_minority/religious_majority/religious_minority/X] value = [new issue type] where = [prov id] # X is a percentage of the total POPs. The "where" field affects whole State of prov id.
type = pop_cash which = [religion/culture/ideology/workforce/cultural_majority/cultural_minority/religious_majority/religious_minority/X] value = Y where = [prov id]	# If no where field is specified the change is for all states. X is a percentage of the total POPs. The "where" field affects whole State of prov id.
type = convert_pop_type which = [religion/culture/ideology/workforce/cultural_majority/cultural_minority/religious_majority/religious_minority] value = [religion/culture/ideology/workforce/cultural_majority/religious_majority] where = [prov id] when = X # If no where field is specified the change is for all states. X is a percentage of the total POPs. The "where" field affects whole State of prov id.
type = revolt which = culture value = division_type where = [prov/-1] [when = state (if -1 to limit inside)] # which = -2 means the largest minority culture
type = life_sustainability which = prov value = X when = [1/0] # if no 'when' field is specified, or if set to 0, the change is permanent, else it will gradually normalize over time.
type = education_modifier value = X
type = research_points value = X
type = social_reform_cost_mod value = X
type = political_reform_cost_mod value = X
type = plurality value = X
type = national_trauma value = [yes/no]
type = separatism value = [yes/no]
type = revanchism value = [yes/no]
type = rebel_spawn_rate which = [ideology] value = X
type = terminate_loans
type = railroad_cost_mod value = X
type = railroad_level value = X
type = land_fort which = [prov id/-1] value = [value to add]
type = railroad which = [prov id/-1] value = [value to add]
type = TA_to_hit value = X # Torpedo Attack to-hit-chance
type = GA_to_hit value = X # Gun Attack to-hit-chance
type = pop_growth_mod value = X
type = attrition_mod value = X
type = work_hour_eff value = X
type = bond_sale_mod value = X
type = tax_eff value = X
type = tariff_eff value = X
type = loan_interest_rate value = X
type = loan_repayment_eff value = X
type = may_inc_capacity
type = may_dec_capacity
type = capacity_cost_mod value = X
type = factory_cost_mod value = X
type = capitalist_bonus value = X
type = aristocrat_bonus value = X
type = account_eff which = [main/education/police/social] value = X
type = strata_income_mod which = [rich/middle/low] value = X
type = event_chance which = [event id] value = X
type = establishment which = [naval_industrial/army_industrial/banker_science/industrialist_science/traditional_academic/radical_academic]
type = ban_party which = party id
type = allow_party which = party id # -1 means all banned parties
type = sleep_party which = party id
type = wake_party which = party id
type = leave_alliance which = [tag] # If no which field is specified, all alliances are broken
type = guarantee which = [tag] # Guarantee independence
type = hold_election
type = diplomatic_efficiency value = X
type = alliance which = country value = [0/1] where = country when = [0/1] # If 'value = 1' the alliance will be defensive. If 'where' is set, that country will be an exception to the alliance. 'when' = 1 means the alliance will never expire.
type = war which = country
type = inherit which = country (-1 for random)
type = leader which = leader id
type = country which = [tag] # Change country tag, name and flag
type = trigger which = event id
type = capital which = provnum
type = addcore which = provnum # -1 is a random non-national province bordering the country, -2 is a randon non-national province in the country, -3 is a random non-national province bordering your national provinces (in the country or outside)
type = removecore which = provnum
type = secedeprovince which = country  value = provice
type = receiveprovince which = prov
type = control which = country value = province
type = sleepleader which = leader id
type = sleepevent which = event id
type = setflag which = [keyname] value = X  # Where the value field is optional
type = incflag which = [keyname] value = X  # Where the value field is optional
type = clrflag which = [keyname]
type = local_setflag which = [keyname] value = X  # Where the value field is optional
type = local_incflag which = [keyname] value = X  # Where the value field is optional
type = local_clrflag which = [keyname]
type = gain_tech which = [tech id/-1 for random tech]
type = peace which = [country tag] value = [0/1] # 1 means separate peace - i.e. pull out of alliance. 0 is full peace, for the whole alliance.
type = access which = [country tag] # Grant military access _to_ a country
type = switch_allegiance which = [country tag] value = [unit id/-1]
type = delete_unit which = [unit id/-1/-2/-3] # -1 = land or naval unit, -2 = land unit, -3 = naval unit
type = independence which = [country tag] value = [0/1] # 0 - units in the area change allegiance, 1 - they don't, and the new nation becomes a satellite
type = ai which = [file name]	# Switches the ai file of a country.
type = build_division which = [division type] value = [brigade type]
type = add_division which = [div type]	value = [brigade type]	# Magically create a new division in the force pool
type = add_division which = [div type]	value = [brigade type]	when = province # Magically create a new division in province
type = end_access which = [country tag]	# Revoke military access for nation
type = make_satellite which = [country tag]
type = make_dominion which = [country tag] # If the country does not exist, it will be created if its core provinces are owned by the nation getting the event
type = make_colony which = [country tag]
type = end_satellite	# End satellite status
type = end_satellite_mastery which = [country tag]	# End satellite mastery over another nation
type = end_dominion	# End dominion status
type = end_dominion_mastery which = [country tag]	# End dominion mastery over another nation
type = convoy which = [startprov] value = [endprov] when = [resource_bits] 1=oil, 2=steel, 4=coal, 8=rubber, 16=supplies
type = construct which = [coaling_station/fort/mission/trade_post/railroad] where = [prov id/-1/-2] # -1 is a random province, -2 is a random core province. NOTE: Will replace any previous claim buildings. Use with care.
type = civilized value = [yes/no]
type = set_slavery value = [yes/no] # Declare slavery legal or illegal
type = set_ruling_party which = [party id]
type = force_ruling_party which = [ideology] # Will try to institute a party corresponding to the given ideology
type = fort_level value = X # Allowed max level (limited by techs). Like the railroad level.
type = prov_owner_war which = [province] value = [country tag] # War on owner of province. If a country is specified in the value field, ignore this command if the country is the owner of the province.
type = break_guarantee which = [tag]
type = neutrality # Dissolve all alliances and set all satellites free
type = army_revolt which = [prov] value = [chance] # Prov affects its whole state. No which field means whole nation.
type = leadership value = X
type = pop_ideology which = [religion/ideology/culture/workforce/cultural_majority/cultural_minority/religious_majority/religious_minority/X] value = [new ideology] where = [prov id] # X is a percentage of the total POPs. The "where" field affects whole State of prov id.
type = canal where = prov_id

type = prestige value = X
type = activate_building_type which = [factory/RGO type]
type = production_modifier which = [factory/RGO type] value = X
type = minority_emigration value = X
type = prestige_mod value = X
type = research_cost value = X
type = research_time value = X
type = colonial_migration value = X
type = colony_creation_prestige_mod value = X # NOTE: Less is better. This reduces the prestige penalty for taking provinces in a peace, if they are of an accepted culture. At 0, the penalty is 0.
type = same_culture_prov_prestige_mod value = X
type = defense_spending_prestige_mod value = X
type = tech_prestige value = X
type = pop_research_mod which = [workforce type] value = X
type = social_anthropology value = [yes/no]
type = vote_on_ideology value = [yes/no]
type = constitution which = [democracy/constitutional_monarchy/monarchy/presidential_dictatorship/proletarian_dictatorship]
type = executive_designation which = [parliamentarism/hms_government/laws_by_decree]
type = party_system which = [multi_party/two_party/one_party]
type = national_value which = [liberty/equality/order]
type = voting_rights which = [none/landed/wealth/suffrage]
type = press_rights which = [state_press/censorship/free_press]
type = political_parties which = [none_allowed/right_to_ban/all_allowed]
type = trade_unions which = [none/non_socialist/socialist/all]
type = public_meetings value = [yes/no]
type = maximum_workhours which = [8/10/12/14/24]
type = minimum_wages which = [none/trinkets/low/acceptable/good]
type = safety_regulations which = [none/trinkets/low/acceptable/good]
type = health_care which = [none/trinkets/low/acceptable/good]
type = unemployment_subsidies which = [none/trinkets/low/acceptable/good]
type = pension_funds which = [none/trinkets/low/acceptable/good]

type = add_pop which = [culture/workforce] value = X where = [prov/-1]
type = receivestate which = prov when = [0/1] # when = 1 means only claim buildings
type = crime_fighting_eff value = X
type = controlstate  which = country value = prov # Give control (but not ownership) of state to some other country
type = secedestate  which = country value = prov when = [0/1] # Give control and ownership of state to some other country. When = 1 means only claim buildings.
type = gain_building which = prov/-1 value = [type]  # If a factory, prov specifies a state. Value = -2 means a random factory.
type = remove_building which = prov/-1
type = remove_corruption which = prov/-1

type = activate_division_type which = [div/brigade type]
type = deactivate_division_type which = [div/brigade type]
type = activate_torpedo_attack

type = shock_attack which = [land unit type] value = X
type = fire_attack which = [land unit type] value = X
type = gun_attack which = [naval unit type] value = X
type = torpedo_attack which = [naval unit type] value = X
type = shore_bombardment which = [naval unit type] value = X
type = range which = [naval unit type] value = X
type = visibility which = [naval unit type] value = X
type = detection which = [naval unit type] value = X
type = transport_capacity which = [naval unit type] value = X
type = minelayer which = [naval unit type] value = X
type = minesweeper which = [naval unit type] value = X
type = defense which = [unit type] value = X
type = build_time which = [unit type] value = X
type = speed which = [unit type] value = X
type = max_elan which = [unit type] value = X
type = max_organization which = [unit type] value = X
type = supplyconsumption which = [unit type] value = X
type = reliability which = [unit type] value = X
